package com.busdepot.webapp.domain;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("partService")
public class PartServiceImpl implements PartService {

	@Autowired
	PartRepository partRepository;

	public List<AbstractPart> getPartById(int id) {
		return partRepository.getPartById(id);
	}

	public void save(AbstractPart abstractPart) {
		partRepository.save(abstractPart);
	}

	public List<AbstractPart> getPartByNumber(String partNumber) {
		return partRepository.getPartByNumber(partNumber);
	}

}
